@import "./_theme.less";
@import "./_reset.less";
@import "./transfrom.less";
@menuText:#bfcbd9;
@menuActiveText:#409EFF;
@subMenuActiveText:#f4f4f5; // https://github.com/ElemeFE/element/issues/12951

@menuBg:#304156;
@menuHover:#263445;

@subMenuBg:#1f2d3d;
@subMenuHover:#001528;
@sideBarWidth: 210px;

#app .hideSidebar .main-container{
  margin-left: 80px !important;
}
#app .hideSidebar .el-submenu > .el-submenu__title {
  padding-left: 20px !important;
}

.main-container {
  height: 100vh;
  transition: margin-left .28s;
  margin-left: @sideBarWidth;
  position: relative;
  overflow: hidden;
}

.sidebar-container {
  transition: width 0.28s;
  width: @sideBarWidth !important;
  background-color: @menuBg;
  height: 100%;
  position: fixed;
  font-size: 0px;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1001;
  overflow: hidden;

  // reset element-ui css
  .horizontal-collapse-transition {
    transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
  }

  .scrollbar-wrapper {
    overflow-x: hidden !important;
  }

  .el-scrollbar__bar.is-vertical {
    right: 0px;
  }

  .el-scrollbar {
    height: 100%;
  }

  &.has-logo {
    .el-scrollbar {
      height: calc(100% - 50px);
    }
  }

  .is-horizontal {
    display: none;
  }

  a {
    display: inline-block;
    width: 100%;
    overflow: hidden;
  }

  .svg-icon {
    margin-right: 16px;
  }

  .el-menu {
    border: none;
    width: 100% !important;
  }

  // menu hover
  .submenu-title-noDropdown,
  .el-submenu__title {
    &:hover {
      background-color: @menuHover !important;
    }
  }

  .is-active>.el-submenu__title {
    color: @subMenuActiveText !important;
  }

  & .nest-menu .el-submenu>.el-submenu__title,
  & .el-submenu .el-menu-item {
    min-width: @sideBarWidth !important;
    background-color: @subMenuBg !important;
    /* 超出省略号 */
    padding-right: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    &:hover {
      background-color: @subMenuHover !important;
    }
  }

  // 最后一个菜单被隐藏问题修复
  .el-scrollbar__view > ul.el-menu {
    padding-bottom: 65px;
  }
}

.hideSidebar {
  .sidebar-container {
    width: 54px !important;
  }

  .main-container {
    margin-left: 54px;
  }

  .submenu-title-noDropdown {
    padding: 0 !important;
    position: relative;

    .el-tooltip {
      padding: 0 !important;

      .svg-icon {
        margin-left: 20px;
      }
    }
  }

  .el-submenu {
    overflow: hidden;

    &>.el-submenu__title {
      padding: 0 !important;

      .svg-icon {
        margin-left: 20px;
      }

      .el-submenu__icon-arrow {
        display: none;
      }
    }
  }

  .el-menu--collapse {
    .el-submenu {
      &>.el-submenu__title {
        &>span {
          height: 0;
          width: 0;
          overflow: hidden;
          visibility: hidden;
          display: inline-block;
        }
      }
    }
  }
}

.el-menu--collapse .el-menu .el-submenu {
  min-width: @sideBarWidth !important;
}

// mobile responsive
.mobile {
  .main-container {
    margin-left: 0px !important;
  }

  .sidebar-container {
    transition: transform .28s;
    width: @sideBarWidth !important;
  }

  &.hideSidebar {
    .sidebar-container {
      pointer-events: none;
      transition-duration: 0.3s;
      transform: translate3d(-@sideBarWidth, 0, 0);
    }
  }
}

.withoutAnimation {

  .main-container,
  .sidebar-container {
    transition: none;
  }
}

// when menu collapsed
.el-menu--vertical {
&>.el-menu {
  .svg-icon {
    margin-right: 16px;
  }
}

.nest-menu .el-submenu>.el-submenu__title,
.el-menu-item {
  &:hover {
    // you can use @subMenuHover
    background-color: @menuHover !important;
  }
}

// the scroll bar appears when the subMenu is too long
>.el-menu--popup {
  max-height: 100vh;
  overflow-y: auto;

  &::-webkit-scrollbar-track-piece {
    background: #d3dce6;
  }

  &::-webkit-scrollbar {
    width: 6px;
  }

  &::-webkit-scrollbar-thumb {
    background: #99a9bf;
    border-radius: 20px;
  }
}
}
/*vue加载闪现问题解决*/
[v-cloak] {
  display: none;
}

html,body {
  min-height: 100%;
  height: 100%;
  min-width: 1000px;
}
body {
  font-family: 'Arial', 'microsoft yahei';
  color: #333;
  line-height: 1.5;
  font-size: 12px;
  word-break: break-all;
  background-color: #f6f6f6;
  margin: 0px auto;
  padding: 0px;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
form,
ul,
li,
ol,
dl,
dt,
dd,
input,
button,
textarea,
form {
  margin: 0px;
  padding: 0px;
  font-weight: normal;
}

dt,
dd {
  line-height: inherit;
}

a {
  color: #333;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)
}

a:hover,
a:active,
a:focus {
  color: @color-1;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)
}

ul,
ol,
dl {
  list-style: none;
}

img {
  border: none;
  vertical-align: top;
  max-width: 100%;
}

input,
button,
select,
textarea {
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  box-sizing: border-box;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  min-height: auto;
}
textarea {
  resize: none
}
//
//// 美化滚动条
//::-webkit-scrollbar {
//  width:9px;
//  height:9px;
//}

// 公共间距样式
.mt-0 {
  margin-top: 0px !important;
}
.mt-10 {
  margin-top: 10px !important;
}
.mr-0 {
  margin-right: 0 !important;
}
.mr-5 {
  margin-right: 5px !important;
}
.mr-10 {
  margin-right: 10px !important;
}
.mr-15 {
  margin-right: 15px !important;
}
.mr-20 {
  margin-right: 20px !important;
}
.pt-0 {
  padding-top: 0px !important;
}
.pr-20 {
  padding-right: 20px !important;
}

// 公共颜色样式
.color-1 {
  color: @color-1;
}
.color-help {
  color: #969799;
}

// 公共布局样式
.flex-center {
  display: flex;
  align-items: center;
}

// 无数据样式
.no-data {
  padding: 100px;
  text-align: center;
  font-size: 12px;
  color: #999;
}


/*
*
* 模态框内表格样式
*
*/
// 表格筛选
.table-search {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
// 表格列表
.dialog-table {
  th {
    color: #333;
    background: #f7f8fa;
  }
}
// 表格翻页
.table-page {
  padding-top: 10px;
  overflow: hidden;
  .el-pagination {
    float: right;
  }
}

/*
*
* 组件编辑内模拟表单样式
*
*/
.com-form-group {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  .com-form-label {
    margin-right: 16px;
    font-size: 14px;
    color: #969799;
    line-height: 18px;
    white-space: nowrap;
  }
  .com-form-content {
    flex: 1;
    align-items: center;
  }
}


/*
*
* element-ui 组件自定义样式
*
*/

// button
.el-button {
  font-weight: 400;
  border-radius: 2px;
}

// 模态框
.el-dialog__header {
  border-bottom: 1px solid #eee;
}
.el-dialog__body {
  padding: 16px;
}
.el-dialog__footer {
  text-align: center;
}

// input
.el-input__inner, .el-textarea__inner {
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 2px;
}



